package edu.lnu.ums.entities;

import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;

@Entity
public class Deanery extends AdministrativeUnit {

    private static final long serialVersionUID = 1L;
    @ManyToOne(cascade = CascadeType.PERSIST)
    @JoinColumn
    private Teacher substitute;

    public Teacher getSubstitute() {
        return substitute;
    }

    public void setSubstitute(Teacher substitute) {
        this.substitute = substitute;
    }
}
